import java.io.Serializable;

public class Movie implements Serializable {
    private static final long serialVersionUID = 1L;

    private String id;
    private String name;
    private String duration; // 时长，如"120min"
    private String type; // 影片类型
    private double price; // 票价

    public Movie(String id, String name, String duration, String type, double price) {
        this.id = id;
        this.name = name;
        this.duration = duration;
        this.type = type;
        this.price = price;
    }

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "影片ID: " + id + ", 名称: " + name + ", 时长: " + duration +
                ", 类型: " + type + ", 票价: " + price + "元";
    }
}
